#ifndef MEASURE_SIZE_TRACKER_DRAW_VISITOR_H_
#define MEASURE_SIZE_TRACKER_DRAW_VISITOR_H_

#if defined(_MSC_VER)
#pragma once
#endif

#include "geometry_elements.h"
#include "boost\variant\static_visitor.hpp"

class draw_visitor : public boost::static_visitor<>
{
public:

  draw_visitor(long window_id, int line_width, const color_t &line_color)
    : window_id_(window_id)
    , line_width_(line_width)
    , line_color_(line_color)
  {
  }

  ~draw_visitor(void)
  {
  }

public:

  void operator()(const point_2& point) const
  {
    draw_obj::DrawCross(window_id_, point, draw_obj::sMarkerSize,
      line_width_, line_color_);
  }

  void operator()(const segment_2& segment) const
  {
    draw_obj::DrawSegment(window_id_, segment, line_width_, line_color_);
  }

  void operator()(const box_2& box) const
  {
    draw_obj::DrawBox(window_id_, box, line_width_, line_color_);
  }

  void operator()(const angle_box_2& angle_box) const
  {
    draw_obj::DrawAngleBox(window_id_, angle_box, line_width_, line_color_);
  }

  void operator()(const ring_2& ring) const
  {
    draw_obj::DrawRing(window_id_, ring, line_width_, line_color_);
  }

  void operator()(const arc_2& arc) const
  {
    draw_obj::DrawArc(window_id_, arc, line_width_, line_color_);
  }

  void operator()(const annulus_2& annulus) const
  {
    draw_obj::DrawAnnulus(window_id_, annulus, line_width_, line_color_);
  }

  void operator()(const annulus_arc_2& annulus_sector) const
  {
    draw_obj::DrawAnnulusSector(window_id_, annulus_sector, line_width_, line_color_);
  }

  void operator()(const polygon_2& polygon) const
  {
    draw_obj::DrawPolygon(window_id_, polygon, line_width_, line_color_);
  }

private:
  long            window_id_;
  int             line_width_;
  const color_t  &line_color_;
};

#endif // MEASURE_SIZE_TRACKER_DRAW_VISITOR_H_